<template>
  <HelloWorld msg="Vite + Vue3 + Ts" />
</template>

<script setup lang="ts">
import HelloWorld from '@/components/HelloWorld.vue';
import { Loading } from '@/utils/tools';

onActivated(() => {
  // 调用时机为首次挂载
  // 以及每次从缓存中被重新插入时
  console.log('onActivated');
});

getData();

function getData() {
  // 模拟加载
  Loading();
  setTimeout(() => {
    Loading(false);
  }, 1000);
}
</script>

<style scoped></style>
